package tech.aistar.corejava.day05.HomeWork;

/**
 * Created by 李雨昂 on 2019/7/20.
 */
public class niuniiu {
    public static void main(String[] args) {
        System.out.println(test(509));
    }
    public static int test(int x){
        int sum = x;
        while (true){
            sum += x/10;
            x = x/10;
            if(x/10 == 0){
                break;
            }
        }
        return sum;
    }
}
